import Wuliao from '../components/engineering/wuliao-dialog'
import Warehousing from '../components/engineering/warehousing-dialog'
import Fund from '../components/engineering/fund-dialog'
import Supplier from '../components/purchase/supplier-dialog'
import Inquiry from '../components/purchase/inquiry-dialog'
import EO from '../components/purchase/eo-dialog'
import Reduction from '../components/finance/reduction-dialog'
import Additional from '../components/finance/additional-dialog'
import Deduction from '../components/finance/deduction-dialog'
import Payment from '../components/finance/payment-dialog'
import Expend from '../components/finance/expend-dialog'
import Voucher from '../components/finance/voucher-dialog'
import Temporary from '../components/finance/temporary-dialog'
import Reimbursement from '../components/finance/reimbursement-dialog'
import Invoicing from '../components/finance/invoicing-dialog'
import Leave from '../components/administration/leave-dialog'
import Travel from '../components/administration/travel-dialog'
import Out from '../components/administration/out-dialog'
import Overtime from '../components/administration/overtime-dialog'
import Cart from '../components/administration/cart-dialog'
import Dormitory from '../components/administration/dormitory-dialog'
import Seal from '../components/administration/seal-dialog'
import Loss from '../components/administration/loss-dialog'
import Become from '../components/administration/become-dialog'
import Quit from '../components/administration/quit-dialog'

export default {
  components: { Wuliao, Fund, 
    Supplier, Inquiry, EO, Warehousing, Leave, Travel, Out, Overtime, Cart, Dormitory, Seal, Loss, Become, Quit,
    Reduction, Additional, Deduction, Payment, Expend, Voucher, Temporary, Reimbursement, Invoicing },
  data() {
    return {
      engineerings: [
        { name: '物料申请', key: 'wuliao', dialog: { dField: ['id', 'pro', 'files', 'remark', 'cc'], dTitle: '物料申请' }},
        { name: '材料入库', key: 'warehousing', dialog: { dField: ['id', 'pro', 'files', 'type', 'proportion', 'des', 'remark', 'cc'], dTitle: '材料入库' }},
        { name: '款项申请', key: 'fund', dialog: { dField: ['id', 'pro', 'files', 'type', 'proportion', 'des', 'remark', 'cc'], dTitle: '款项申请' }}
      ],
      purchases: [{ name: '供应商', key: 'supplier', dialog: { dField: ['id', 'pro', 'files', 'remark', 'name', 'registered_capital', 'credit_code', 'main_business', 'settlement_period', 'payment', 'cc'], dTitle: '供应商' }},
        { name: '询价单', key: 'inquiry', dialog: { dField: ['id', 'pro', 'files', 'remark', 'name', 'inquiry_time', 'cc'], dTitle: '询价单' }},
        { name: '工程外包', key: 'eo', dialog: { dField: ['id', 'pro', 'files', 'remark', 'supplier', 'cc'], dTitle: '工程外包' }}],
      finances: [{ name: '追减结算', key: 'reduction', dialog: { dField: ['id', 'money', 'pur', 'files', 'remark', 'cc'], dTitle: '追减结算' }},
        { name: '追加结算', key: 'additional', dialog: { dField: ['id', 'money', 'pur', 'files', 'remark', 'cc'], dTitle: '追加结算' }},
        { name: '扣款结算', key: 'deduction', dialog: { dField: ['id', 'pro', 'files', 'remark', 'cc'], dTitle: '扣款结算' }},
        { name: '付款申请', key: 'payment', dialog: { dField: ['id', 'files', 'remark', 'pro_name', 'company', 'pay_money', 'pay_type', 'pay_to', 'reason', 'cc'], dTitle: '付款申请' }},
        { name: '设材支出凭单', key: 'expend', dialog: { dField: ['id', 'pur', 'files', 'remark', 'detailed', 'company', 'money', 'pay_type', 'pay_time', 'cc'], dTitle: '设材支出凭单' }},
        { name: '分包支出凭单', key: 'voucher', dialog: { dField: ['id', 'pro', 'files', 'remark', 'cc'], dTitle: '分包支出凭单' }},
        { name: '暂支申请单', key: 'temporary', dialog: { dField: ['id', 'company', 'addr', 'reason', 'money', 'use_time', 'return_time', 'word', 'remark', 'cc'], dTitle: '暂支申请单' }},
        { name: '报销申请', key: 'reimbursement', dialog: { dField: ['id', 'pro', 'files', 'remark', 'company', 'type', 'reason', 'money', 'pay_money', 'cc'], dTitle: '报销申请' }},
        { name: '开票申请', key: 'invoicing', dialog: { dField: ['id', 'pro', 'files', 'remark', 'cc'], dTitle: '开票申请' }}],
      administrations: [{ name: '请假', key: 'leave', dialog: { dField: ['id', 'files', 'type', 'begin_time', 'end_time', 'duration', 'reason', 'agent', 'cc'], dTitle: '请假' }},
        { name: '出差', key: 'travel', dialog: { dField: ['id', 'files', 'addr', 'begin_time', 'end_time', 'region', 'reason', 'ticket', 'remark', 'cc'], dTitle: '出差' }},
        { name: '外出', key: 'out', dialog: { dField: ['id', 'files', 'addr', 'begin_time', 'end_time', 'reason', 'remark', 'cc'], dTitle: '外出' }},
        { name: '加班', key: 'overtime', dialog: { dField: ['id', 'files', 'type', 'begin_time', 'end_time', 'duration', 'pattern', 'reason', 'remark', 'cc'], dTitle: '加班' }},
        { name: '用车申请', key: 'cart', dialog: { dField: ['id', 'files', 'plate_num', 'addr', 'out_time', 'return_time', 'before_km', 'end_km', 'reason', 'remark', 'cc'], dTitle: '用车申请' }},
        { name: '宿舍申请', key: 'dormitory', dialog: { dField: ['id', 'files', 'promisor', 'promise_date', 'reason', 'remark', 'cc'], dTitle: '宿舍申请' }},
        { name: '用印申请', key: 'seal', dialog: { dField: ['id', 'files', 'company', 'file_name', 'file_num', 'use_time', 'seal_name', 'is_go', 'remark', 'cc'], dTitle: '用印申请' }},
        { name: '报损报废', key: 'loss', dialog: { dField: ['id', 'files', 'la_id', 'damage_time', 'unit', 'num', 'price', 'reason', 'degree', 'remark', 'cc'], dTitle: '报损报废' }},
        { name: '转正申请', key: 'become', dialog: { dField: ['id', 'files', 'become_time', 'evaluate', 'remark', 'cc'], dTitle: '转正申请' }},
        { name: '离职申请', key: 'quit', dialog: { dField: ['id', 'files', 'quit_time', 'handover', 'reason', 'remark', 'cc'], dTitle: '离职申请' }}],
      approveKey: {
        'PROCESS_LEAVE': 'administrations#0',
        'PROCESS_TRAVEL': 'administrations#1',
        'PROCESS_OUT': 'administrations#2',
        'PROCESS_OVERTIME': 'administrations#3',
        'PROCESS_CART': 'administrations#4',
        'PROCESS_DORMITORY': 'administrations#5',
        'PROCESS_SEAL': 'administrations#6',
        'PROCESS_DAMAGE': 'administrations#7',
        'PROCESS_BECOME': 'administrations#8',
        'PROCESS_QUIT': 'administrations#9',

        'PROCESS_WULIAO': 'engineerings#1',
        'PROCESS_WAREHOUSING': 'engineerings#2',
        'PROCESS_FUND': 'engineerings#3',

        'PROCESS_SUPPLIER': 'purchases#0',
        'PROCESS_PRO_INQUIRY': 'purchases#1',
        'PROCESS_PRO_OUTSOURCE': 'purchases#2',

        'PROCESS_PURCHASE_REDUCTION': 'finances#0',
        'PROCESS_PURCHASE_ADDITIONAL': 'finances#1',
        'PROCESS_PRO_DEDUCTION': 'finances#2',
        'PROCESS_FINANCE_PAYMENT': 'finances#3',
        'PROCESS_PURCHASE_EXPEND': 'finances#4',
        'PROCESS_PRO_OUTSOURCE_EXPEND': 'finances#5',
        'PROCESS_FINANCE_TEMPORARY': 'finances#6',
        'PROCESS_PRO_REIMBURSEMENT': 'finances#7',
        'PROCESS_PRO_INVOICING': 'finances#8'
      }
    }
  },
  methods: {
  }
}
